<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>switch语句；</title>
</head>
<body>
<script type="text/javascript">
 var d=6;
 switch(d){
 case 1:alert("周一");break;
 case 2:alert("周二");break;
 case 3:alert("周三");break;
 case 4:alert("周四");break;
 case 5:alert("周五");break;
 case 6:alert("周六");break;
 case 7:alert("周日");break;
 default:alert("逆天了");
 }
</script>
</body>
</html>